<!DOCTYPE html>
<html dir="ltr" lang="<?php echo str_replace('_', '-', osc_current_user_locale()) ; ?>">
    <head>
        <?php osc_current_web_theme_path('head.php') ; ?>
        <meta name="robots" content="noindex, nofollow" />
        <meta name="googlebot" content="noindex, nofollow" />	
    </head>
    <body>
        <?php osc_current_web_theme_path('header.php') ; ?>
        <div class="container user">
            <div class="row">
                <div class="span16 columns">
                    <?php twitter_show_flash_message() ; ?>
                    <?php twitter_user_menu() ; ?> 
                </div>
            </div>
			
			<div class="tag_content">
			 <h2><?php _e('Your items', 'twitter') ; ?> <?php if(osc_count_items() > 0) { ?>
			 <span style="float:right;"><?php 			 
			 echo user_items(); ?>&nbsp;<?php _e('vehicles', 'twitter') ; ?></span><?php } ?>
			 </h2>			
			 <hr/>
            <?php if(osc_count_items() == 0) { ?>
            <div class="row">
                <div class="span16 columns" style="text-align:center;">
                    <h3><?php _e("You don't have any items yet", 'twitter') ; ?></h3>
                    <br/>
                    <a class="btn info large" style="font-weight:bold;" href="<?php echo osc_item_post_url_in_category() ; ?>">
                        <?php _e("Publish your ad for free", 'twitter'); ?>
                    </a>  
                    <br/><br/>
                </div>
            </div>
            <?php } else { ?>
                <?php while( osc_has_items() ) { ?>
                <div class="row">
                    <div class="span15 columns">
					<div class="photo">
						 <a href="<?php echo osc_item_url() ; ?>">
						<?php if( osc_count_item_resources() ) { ?>
					   
							<img src="<?php echo osc_resource_thumbnail_url() ; ?>" width="148px" height="110px" title="<?php echo osc_item_title(); ?>" alt="<?php echo osc_item_title(); ?>" />
					   
						<?php } else { ?>
						<!--<img src="<?php //echo osc_current_web_theme_url('images/no_photo.gif') ; ?>" alt="" title=""/>-->
						sin fotos
						<?php } ?>
						 </a>
					</div>
					<div style="margin-left:20px;float:left;width:53%;">
                        <h4><a href="<?php echo osc_item_url(); ?>"><?php echo osc_item_title(); ?></a>
							<span class="label grey" style="text-transform: lowercase;margin-left:10px;"><?php _e("Ref", 'twitter'); ?> <?php echo osc_item_id(); ?></span>	
						</h4>
                        <p class="gray"><?php printf(__('<strong>Publish date</strong>: %s', 'twitter'), osc_format_date( osc_item_pub_date() ) ) ; ?></p>
                        <?php
                            $location = array() ;
                            if( osc_item_country() != '' && count(osc_get_countries())>1 ) {
                                $location[] = sprintf( __('<strong>Country</strong>: %s', 'twitter'), osc_item_country() ) ;
                            }
                            if( osc_item_region() != '' ) {
                                $location[] = sprintf( __('<strong>Region</strong>: %s', 'twitter'), osc_item_region() ) ;
                            }
                            if( osc_item_city() != '' ) {
                                $location[] = sprintf( __('<strong>City</strong>: %s', 'twitter'), osc_item_city() ) ;
                            }
                            if( count($location) > 0) {
                        ?>
                        <p class="gray"><?php echo implode(' &middot; ', $location) ; ?></p>
                        <?php } ?>
                        <p><?php echo osc_highlight( strip_tags( osc_item_description() ) ) ; ?></p>
                        
					</div>
				
					<div style="float:right;">
					
					  <span class="label notice" style="font-size:10px;float:right; padding-top:10px;padding-left:12px;padding-right:12px;padding-bottom:4px;text-transform: lowercase;text-align:center;">
					    <span style="font-size: 20px;"><?php echo osc_item_views(); ?></span><br/><?php _e('Views', 'twitter') ; ?>
					  </span>
					  <BR>&nbsp;<BR>
					  <br/><br/>
						<p>
                            <strong>							
							<a class="delete" href="<?php echo osc_item_edit_url(); ?>">
							<i class="icon-pencil" title="Edit vehicle"></i>&nbsp;<?php _e('Edit', 'twitter') ; ?></a></strong>
                            &middot;
                            <strong><a class="delete" onclick="javascript:return confirm('<?php _e('This action can not be undone. Are you sure you want to continue?', 'twitter') ; ?>')" href="<?php echo osc_item_delete_url() ; ?>" >
							<i class="icon-trash" title="Delete vehicle"></i>&nbsp;<?php _e('Delete', 'twitter') ; ?></a></strong>
                            <?php if( osc_item_is_inactive() ) { ?>
                            &middot;
                            <a href="<?php echo osc_item_activate_url() ; ?>" ><?php _e('Activate', 'twitter') ; ?></a>
                            <?php } ?>
                        </p>
					</div>
					<div style="float:right;">
						<span class="label grey2" >
							<?php echo osc_item_category(); ?>
						</span>									
					</div>
					
                    </div>
                </div>
				<hr/>
                <?php } ?>
                <?php if ( osc_list_total_pages() > 0 ) { ?>
                <div class="pagination">
                        <?php echo twitter_user_item_pagination() ; ?>
                </div>
                <?php } ?>
            <?php } ?>
			</div>
        </div>
        <?php osc_current_web_theme_path('footer.php') ; ?>
    </body>
</html>